home *** CD-ROM | disk | FTP | other *** search
/ SPACE 1 / SPACE - Library 1 - Volume 1.iso / program / 70 / examples / examples.arc / SUPER.ST < prev    next >
Text File  |  1985-11-20  |  971b  |  48 lines

  1. Class One
  2. [
  3.         test
  4.                 ^ 1
  5. |       result1
  6.                 ^ self test
  7. ]
  8.  
  9. Class Two :One
  10. [
  11.         test
  12.                 ^ 2
  13. ]
  14.  
  15. Class Three :Two
  16. [
  17.         result2
  18.                 ^ self result1
  19. |       result3
  20.                 ^ super test
  21. ]
  22.  
  23. Class Four :Three
  24. [
  25.         test
  26.                 ^ 4
  27. ]
  28.  
  29. Class Main
  30. | example1 example2 example3 example4 |
  31. [
  32.         main
  33.                 example1 <- One new.
  34.                 example2 <- Two new.
  35.                 example3 <- Three new.
  36.                 example4 <- Four new.
  37.                 example1 test print.
  38.                 example1 result1 print.
  39.                 example2 test print.
  40.                 example2 result1 print.
  41.                 example3 test print.
  42.                 example4 result1 print.
  43.                 example3 result2 print.
  44.                 example4 result2 print.
  45.                 example3 result3 print.
  46.                 example4 result3 print
  47. ]
  48.